home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / pas_all.zip / TI116.ASC < prev    next >
Text File  |  1992-08-12  |  10KB  |  397 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.   PRODUCT : TURBO TUTOR                                NUMBER : 116
  10.   VERSION : 2.00x
  11.        OS : ALL
  12.      DATE : May 21, 1986                                 PAGE : 1/6
  13.     TITLE : UPDATE - LISTT.PAS FROM VERSION 2.00A, B OR C TO 2.00D
  14.  
  15.  
  16.  
  17.  
  18.   This file describes modifications which you can make to versions
  19.   2.00A, 2.00B, or 2.00C of LISTT.PAS which will update them to the
  20.   current version, 2.00D. Since the changes apply to several
  21.   different versions, ignore any modifications that have already
  22.  
  23.   LISTT 2.00D remedies the following conditions which appeared last
  24.   in version:
  25.  
  26.   1. 2.00A (for MS-DOS only) - failure to see an open- or close-
  27.   comment near the end of a long line resulting in key words not
  28.   capitalized, or directives missed.
  29.  
  30.   2. 2.00A - hang on lines ending in an open-comment.
  31.  
  32.   3. 2.00B - The command line buffer in correctly copied into a
  33.   local variable.
  34.  
  35.   4. 2.00B (for MS-DOS only)
  36.        A) Times between noon and 12:59 P.M. printed as A.M.
  37.        B) Times of 12:?? A.M. or P.M. printed as 00:??.
  38.  
  39.   5. 2.00C (for MS-DOS only) - LISTT failing to close the include
  40.   files resulting in not all of the files being printed.
  41.  
  42.   6. 2.00C - Certain printer escape sequences were not interpreted
  43.   properly.
  44.  
  45.   Important Note:     Replace all version numbers with the current
  46.                       version: 2.00D. There are three instances of
  47.                       the version number throughout the program.
  48.  
  49.  
  50.   In the procedure ListIt:
  51.  
  52.     Change from:
  53.        Line: Buffer;
  54.  
  55.     Change to:
  56.        Line, Remainder: Buffer;   { modification ver. 2.00B }
  57.  
  58.  
  59.   In  procedure UpKeyWords:
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.   PRODUCT : TURBO TUTOR                                NUMBER : 116
  76.   VERSION : 2.00x
  77.        OS : ALL
  78.      DATE : May 21, 1986                                 PAGE : 2/6
  79.     TITLE : UPDATE - LISTT.PAS FROM VERSION 2.00A, B OR C TO 2.00D
  80.  
  81.  
  82.  
  83.  
  84.     Change from:
  85.  
  86.       Var
  87.         First, LL, LK, I, J: Integer;
  88.         PossibleKey: String[MaxKeyLenPlus1];
  89.         Min, Max, Guess: Integer;
  90.         Found: Boolean;
  91.  
  92.     Change to:
  93.       Var
  94.         First, LL, LK, I, J: Integer;
  95.         PossibleKey: String[MaxKeyLenPlus1];
  96.         Min, Max, Guess: Integer;
  97.         Found: Boolean;
  98.         Line1: Buffer;           { addition ver. 2.00B }
  99.  
  100.  
  101.     Change from:
  102.         If Line[Length(Line)]=Chr(254) Then Line[0]:=Pred(Line[0]);
  103.        End  { If UpKeys }
  104.       Else  { Not UpKeys }
  105.        While I<LL Do
  106.        Begin
  107.         Case Line[I] Of
  108.          '{': If ParseState<>Quoted Then ParseState:=Comment;
  109.          '(':  If  (ParseState<>Quoted)  And
  110.                  (Copy(Line,I,2)='(*') Then
  111.                 ParseState:=Comment2;
  112.          '}': If ParseState=Comment Then ParseState:=PreKey;
  113.          '*':  If  (ParseState=Comment2) And
  114.                  (Copy(Line,I,2)='*)') Then
  115.                 ParseState:=PreKey;
  116.          '''': If ParseState=Quoted Then ParseState:=PreKey
  117.  
  118.     Change to:
  119.         If Line[Length(Line)]=Chr(254) Then
  120.           Line[0]:=Pred(Line[0]);
  121.        End; { If UpKeys }
  122.       Line1:=Remainder;
  123.             { addition ver. 2.00B note deletion of Else; }
  124.       If UpKeys And (Line[Length(Line)]='*') Then
  125.         Line1:='*'+Line1;  { addition ver. 2.00B }
  126.       If  Not  UpKeys Then Line1:=Line+Remainder;
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.   PRODUCT : TURBO TUTOR                                NUMBER : 116
  142.   VERSION : 2.00x
  143.        OS : ALL
  144.      DATE : May 21, 1986                                 PAGE : 3/6
  145.     TITLE : UPDATE - LISTT.PAS FROM VERSION 2.00A, B OR C TO 2.00D
  146.  
  147.  
  148.  
  149.  
  150.                            { addition ver. 2.00B }
  151.       I:=1; LL:=Length(Line1)+1; { addition ver. 2.00B }
  152.        While I<LL Do
  153.        Begin
  154.        Case Line1[I] Of        { modification ver. 2.00B }
  155.          '{': If ParseState<>Quoted Then ParseState:=Comment;
  156.          '(':  If  (ParseState<>Quoted) And
  157.                  (Copy(Line1,I,2)='(*') Then
  158.                                  { modification ver. 2.00B }
  159.                 ParseState:=Comment2;
  160.          '*':  If (ParseState=Comment2) And
  161.                  (Copy(Line1,I,2)='*)') Then
  162.                                  { modification ver. 2.00B }
  163.                 ParseState:=PreKey;
  164.          '''': If ParseState=Quoted Then ParseState:=PreKey
  165.  
  166.  
  167.   In the procedure TruncateLine:
  168.  
  169.     Change from:
  170.       Begin
  171.        Remainder:=Copy(Line,LineWidth-Extra+1,200);
  172.        Line:=Copy(Line,1,LineWidth-Extra);
  173.       End
  174.  
  175.     Change to:
  176.       Begin
  177.        Remainder:=Copy(Line,LineWidth-Extra+1,200);
  178.        Line:=Copy(Line,1,LineWidth-Extra);
  179.       End
  180.      Else                { addition ver. 2.00B }
  181.       Remainder := '';     { addition ver. 2.00B }
  182.  
  183.  
  184.   In the procedure ProcessDirectives:
  185.  
  186.     Change from:
  187.           If Temp=-1 Then Temp:=Length(Copy(Line,Where+1,200))-1;
  188.           CheckDirective(Where+1,Temp);
  189.           If Not WasCmd Then Where:=Where+Temp+1;
  190.         End;
  191.    '(': Begin
  192.           Temp:=Pos('*)',Copy(Line,Where+2,200))-1;
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207.   PRODUCT : TURBO TUTOR                                NUMBER : 116
  208.   VERSION : 2.00x
  209.        OS : ALL
  210.      DATE : May 21, 1986                                 PAGE : 4/6
  211.     TITLE : UPDATE - LISTT.PAS FROM VERSION 2.00A, B OR C TO 2.00D
  212.  
  213.  
  214.  
  215.  
  216.           If Temp=-1 Then Temp:=Length(Copy(Line,Where+1,200))-1;
  217.           CheckDirective(Where+2,Temp);
  218.           If Not WasCmd Then Where:=Where+Temp+3;
  219.  
  220.     Change to:
  221.           If Temp=-1 Then Temp:=Length(Copy(Line,Where+1,200));
  222.                                        { modification 2.00B }
  223.           CheckDirective(Where+1,Temp);
  224.           If  Not  WasCmd Then  Where:=Where+Temp+2;
  225.                                        { modification 2.00B }
  226.         End;
  227.    '(': Begin
  228.           Temp:=Pos('*)',Copy(Line,Where+2,200))-1;
  229.           If Temp=-1 Then Temp:=Length(Copy(Line,Where+1,200))-1;
  230.                                        { modification 2.00B }
  231.           CheckDirective(Where+2,Temp);
  232.           If  Not  WasCmd Then  Where:=Where+Temp+4;
  233.                                        { modification 2.00B }
  234.  
  235.  
  236.   In the function CommandLineArgument:
  237.  
  238.     Change from:
  239.        Begin
  240.         CLA:='';
  241.         While (J<=Length(CommandLine)) And (CommandLine[J]=' ') Do
  242.         While (J<=Length(CommandLine)) And (CommandLine[J]<>' ') Do
  243.          Begin
  244.           CLA:=CLA+CommandLine[J];
  245.           J:=J+1;
  246.          End;
  247.        End;
  248.  
  249.     Change to:
  250.       Begin
  251.        CLA:='';
  252.        While (J<=Length(CommandLineBuffer)) And
  253.          (CommandLineBuffer[J]='  ')  Do
  254.                                    { modification ver. 2.00B }
  255.        While (J<=Length(CommandLineBuffer)) And
  256.          (CommandLineBuffer[J]<>'  ')  Do
  257.                                    { modification ver. 2.00B }
  258.         Begin
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  
  273.   PRODUCT : TURBO TUTOR                                NUMBER : 116
  274.   VERSION : 2.00x
  275.        OS : ALL
  276.      DATE : May 21, 1986                                 PAGE : 5/6
  277.     TITLE : UPDATE - LISTT.PAS FROM VERSION 2.00A, B OR C TO 2.00D
  278.  
  279.  
  280.  
  281.  
  282.          CLA:=CLA+CommandLineBuffer[J];
  283.                                    { modification ver. 2.00B }
  284.          J:=J+1;
  285.         End;
  286.       End;
  287.  
  288.  
  289.   In the procedure InitParms:
  290.  
  291.     Change from:
  292.       AM_PM:='am';
  293.       If CH>12 Then
  294.        Begin
  295.         CH:=CH-12;
  296.         AM_PM:='pm';
  297.        End;
  298.       Str(CH:2,Hour);
  299.  
  300.     Change to:
  301.       AM_PM:='am';
  302.       If CH>11 Then  { modification ver. 2.00C }
  303.        Begin
  304.         CH:=CH-12;
  305.         AM_PM:='pm';
  306.        End;
  307.       If CH=0 Then CH:=12; { addition ver. 2.00C }
  308.       Str(CH:2,Hour);
  309.  
  310.  
  311.   In the procedure CheckDirective:
  312.  
  313.     Change from:
  314.         If PageForIncludes And PageStarted Then NewPage;
  315.         CurrentInFileName:=InFileName;
  316.        End; { Else include file was found }
  317.  
  318.     Change to:
  319.         If PageForIncludes And PageStarted Then NewPage;
  320.         CurrentInFileName:=InFileName;
  321.         Close(IncludeFile);   { addition ver. 2.00D }
  322.        End; { Else include file was found }
  323.  
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338.  
  339.   PRODUCT : TURBO TUTOR                                NUMBER : 116
  340.   VERSION : 2.00x
  341.        OS : ALL
  342.      DATE : May 21, 1986                                 PAGE : 6/6
  343.     TITLE : UPDATE - LISTT.PAS FROM VERSION 2.00A, B OR C TO 2.00D
  344.  
  345.  
  346.  
  347.  
  348.   In the function CmdStr:
  349.  
  350.     Change from:
  351.       Function CmdStr: Buffer;
  352.  
  353.       Begin
  354.         CmdStr:=Copy(Line,Where+3,Len-3);
  355.       End;
  356.  
  357.     Change to:
  358.       Function CmdStr: Buffer;
  359.  
  360.       Var            { addition ver. 2.00D }
  361.         S: Buffer;    { addition ver. 2.00D }
  362.  
  363.       Begin
  364.         S:=Copy(Line,Where+3,Len-3);
  365.                                         { modification ver. 2.00D }
  366.         if (Length(S) > 2) and (Copy(S, 1, 2) = '^[') then
  367.                                         { addition ver. 2.00D }
  368.           CmdStr:=#27+Copy(S, 3, Length(S)-2)
  369.                                         { addition ver. 2.00D }
  370.         else                            { addition ver. 2.00D }
  371.           CmdStr:=S;                 { addition ver. 2.00D }
  372.       End;
  373.  
  374.   DISCLAIMER: You have the right to use this technical information
  375.   subject to the terms of the No-Nonsense License Statement that
  376.   you received with the Borland product to which this information
  377.   pertains.
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.